<?php
class Zendvn_Validate_ConfirmPass extends Zend_Validate_Abstract{

	const NOT_EQUAL     = 'confirmPassNotEqual';
	
	protected $_messageTemplates = array(
        	self::NOT_EQUAL      => "2 giá trị password không bằng nhau",
		);
	
	//$pass = '123456';
	//$confirm = '123213123';
	
	protected  $_pass;
	
	public function __construct($value){
		$this->_pass = $value;
	}
	
	public function isValid($value){
		if(strcmp($value,$this->_pass) != 0){
			$this->_error('confirmPassNotEqual');
			return false;
		}
		return true;
	}
}